ga.view.aerial
Class AerialUIController<T extends IIndividual<T>>

java.lang.Object
  extended by de.lessvoid.nifty.screen.DefaultScreenController
      extended by ga.view.aerial.AerialUIController<T>
Type Parameters:
T - The generic type of the individuals.
All Implemented Interfaces:
de.lessvoid.nifty.screen.ScreenController, IMenuListenerParent

public class AerialUIController<T extends IIndividual<T>>
extends de.lessvoid.nifty.screen.DefaultScreenController
implements IMenuListenerParent

This is a controller that allows communication with the nifty gui.

Since:
12.08.2012
Author:
Stephan Dreyer

Field Summary
private  AerialEvaluationState<T> evaluator
          The evaluator.
private  T individual
          The individual.
private static java.util.logging.Logger LOGGER
          The Constant LOGGER.
private  MenuListener menuListener
          The menu listener.
 
Constructor Summary
AerialUIController(AerialEvaluationState<T> evaluator)
          Instantiates a new aerial ui controller.
 
Method Summary
 java.lang.String getCosts()
          Gets the costs.
 java.lang.String getGeneration()
          Gets the generation.
 java.lang.String getId()
          Gets the id.
 void onFitnessChange(java.lang.String s)
          Callback method.
 void onTerminate()
          Callback method.
 void rotateDown()
          Callback method.
 void rotateLeft()
          Callback method.
 void rotateRight()
          Callback method.
 void rotateUp()
          Callback method.
 void setIndividual(T individual)
          Sets the individual.
 void setMenuListener(MenuListener menuListener)
          Sets the menu listener.
 
Methods inherited from class de.lessvoid.nifty.screen.DefaultScreenController
bind, gotoScreen, onEndScreen, onStartScreen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER
The Constant LOGGER.


evaluator

private final AerialEvaluationState<T extends IIndividual<T>> evaluator
The evaluator.


individual

private T extends IIndividual<T> individual
The individual.


menuListener

private MenuListener menuListener
The menu listener.

Constructor Detail

AerialUIController

public AerialUIController(AerialEvaluationState<T> evaluator)
Instantiates a new aerial ui controller.

Parameters:
evaluator - the evaluator
Method Detail

setMenuListener

public void setMenuListener(MenuListener menuListener)
Description copied from interface: IMenuListenerParent
Sets the menu listener.

Specified by:
setMenuListener in interface IMenuListenerParent
Parameters:
menuListener - the new menu listener

setIndividual

public void setIndividual(T individual)
Sets the individual.

Parameters:
individual - the new individual

onFitnessChange

public void onFitnessChange(java.lang.String s)
Callback method. Called from the gui.

Parameters:
s - The string.
Since:
12.08.2012

onTerminate

public void onTerminate()
Callback method. Called from the gui.

Since:
12.08.2012

getId

public java.lang.String getId()
Gets the id.

Returns:
the id

getCosts

public java.lang.String getCosts()
Gets the costs.

Returns:
the costs

getGeneration

public java.lang.String getGeneration()
Gets the generation.

Returns:
the generation

rotateLeft

public void rotateLeft()
Callback method. Called from the gui.

Since:
12.08.2012

rotateRight

public void rotateRight()
Callback method. Called from the gui.

Since:
12.08.2012

rotateUp

public void rotateUp()
Callback method. Called from the gui.

Since:
12.08.2012

rotateDown

public void rotateDown()
Callback method. Called from the gui.

Since:
12.08.2012